package cn.ubeta.b2c.bean;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * Created by denny on 2016/10/21.
 */

public class PriceInfo extends ApiResp<List<PriceInfo>> {

    /**
     * skuId : 1234
     * price : 1234
     * mprice : 1234
     */

    @SerializedName("id")
    private long skuId;
    @SerializedName("p")
    private String strPrice;
    private double price;
    @SerializedName("m")
    private String strMprice;
    private double mprice;

    public long getSkuId() {
        return skuId;
    }

    public void setSkuId(long skuId) {
        this.skuId = skuId;
    }

    public double getPrice() {
        if (price == 0F) {
            price = Double.parseDouble(strPrice);
        }
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
        this.strPrice = String.valueOf(price);
    }

    public double getMprice() {
        if (mprice == 0F) {
            mprice = Double.parseDouble(strMprice);
        }
        return mprice;
    }

    public void setMprice(double mprice) {
        this.mprice = mprice;
        this.strMprice = String.valueOf(mprice);
    }

    public String getStrPrice() {
        return strPrice;
    }
}
